package com.xjj.cms.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.xjj.core.modules.entity.IdEntity;

//import com.xjj.core.json.web.JSONNotAware;

@SuppressWarnings("serial")
@Entity
@Table(name = "company")
@XStreamAlias("Company")
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)//二级缓存并没有配置和启用
//这样转换的时候就不转换id 了
//@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "id"})  
public class Company extends IdEntity{
	
	private String name;
	
	private Long parentid;
	
	private Long companylevel;
	
	public Company(){
		
	}
	
	public Company(Long id){
		this.id = id;
	}
	
	public Company(Long id, String name){
		this.id = id;
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getParentid() {
		return parentid;
	}
	public void setParentid(Long parentid) {
		this.parentid = parentid;
	}
	public Long getCompanylevel() {
		return companylevel;
	}
	public void setCompanylevel(Long companylevel) {
		this.companylevel = companylevel;
	}
	

}
